package com.pig4cloud.pig.village.api.entity;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonIgnore;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.format.annotation.DateTimeFormat;

import java.math.BigDecimal;
import java.time.LocalDateTime;

/**
 * 红黑榜，户维度的事件统计
 * @author limbray.li
 * @date 2021/6/12
 */
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@TableName("reward_info")
public class RewardInfo {
	private static final long serialVersionUID = 1L;

	@TableId(value = "id", type = IdType.ASSIGN_ID)
	private Long id;
	@JsonIgnore
	private LocalDateTime createTime;
	@JsonIgnore
	private LocalDateTime updateTime;
	@JsonIgnore
	private String createBy;
	@JsonIgnore
	private String updateBy;
	@JsonIgnore
	@TableLogic(value = "0", delval = "1")
	private String delFlag;
	@JsonIgnore
	private Integer tenantId;

	//外键id
	private Long eventId;
	private Long teamId;
	private Long familyId;
	private Long villagerId;
	private Long welfareId;

	@ApiModelProperty(value = "年份")
	private Integer year;
	@ApiModelProperty(value = "月份")
	private Integer month;
	@ApiModelProperty(value = "日期")
	@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
	@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	private LocalDateTime date;
	@ApiModelProperty(value = "红黑榜",notes = "0:红榜，1:黑榜")
	private Integer punishment;
	@ApiModelProperty(value = "金额-户考核")
	private BigDecimal amountFamily;
	@ApiModelProperty(value = "金额-队考核")
	private BigDecimal amountTeam;
	@ApiModelProperty(value = "确认人")
	private Long checkUser;//TODO 待删除
	@ApiModelProperty(value = "确认人的登录名")
	private String checkName;
	@ApiModelProperty(value = "归档情况")
	private String fileBack;
	@ApiModelProperty(value = "备注")
	private String remark;

	@TableField(exist=false)
	@ApiModelProperty(value = "重大违规类型(SubCode)")
	private String violationSubCode;

}

